﻿using System;
using System.Windows.Data;
using Telerik.Windows.Controls;

namespace BizControl.Presentation.ActivityEditModule.Converters
{
  public class BoolToTileStateConverter : IMultiValueConverter
  {
    #region IMultiValueConverter Members

    public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
    {
      foreach (var value in values)
      {
        if (bool.Parse(value.ToString()))
          return TileViewItemState.Maximized;
      }
      return TileViewItemState.Restored;
    }

    public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
    {
      return null;
    }

    #endregion
  }
}
